<?php

namespace common\models\db;

use Yii;

/**
 * This is the model class for table "video".
 *
 * @property string $id
 * @property string $name
 * @property integer $position
 * @property integer $home
 * @property integer $active
 */
class Video extends \yii\db\ActiveRecord {

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return 'video';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['id', 'name'], 'required'],
            [['position', 'home', 'active'], 'integer'],
            [['id'], 'string', 'max' => 50],
            [['name'], 'string', 'max' => 220]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => Yii::t('app', 'ID'),
            'name' => Yii::t('app', 'Name'),
            'position' => Yii::t('app', 'Position'),
            'home' => Yii::t('app', 'Home'),
            'active' => Yii::t('app', 'Active'),
        ];
    }

    public function attributes() {
        return array_merge(parent::attributes(), ['images']);
    }

}
